home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / NetPokerForMacOSX_Server / HoldEmHigh / PokerTable.h < prev    next >
Encoding:
Text File  |  1999-06-26  |  3.6 KB  |  103 lines

  1. // PokerTable.h
  2.  
  3. #import <AppKit/AppKit.h>
  4. @class Player, Card, HoldEmHighHand, PotManager;
  5.  
  6. @interface PokerTable : NSDocument {
  7.    IBOutlet NSMatrix *playersMatrix;  // 23 folks around the table
  8.                       // the inner rows are transparent
  9.    IBOutlet NSMatrix *publicCardsMatrix;  // 5 of them
  10.    IBOutlet NSMatrix *holeCardsMatrix;    // 2 of them
  11.    IBOutlet NSMatrix *raiseMatrix;    
  12.    IBOutlet NSMatrix *foldCallMatrix;    
  13.    IBOutlet NSTextField *raiseSpecifiedField;
  14.    IBOutlet NSTextField *statusField;
  15.    IBOutlet PotManager *myPot;
  16.    IBOutlet PotManager *thePot;
  17.    NSButtonCell *oldCell;
  18.    NSRect oldRect;
  19.  
  20.     NSMutableArray *players;    // list of players
  21.     Player *buttonPlayer;    // current Button player
  22.     Player *currentPlayer;    // current player
  23.     HoldEmHighHand *hand;    // 5 cards to be turned in turn
  24.     BOOL hasInitedPlayers;
  25.  
  26. }
  27.  
  28. // ui methods:
  29. - (IBAction)privateMessagePlayerAction:(id)sender; // click on a player to send message
  30. - (IBAction)publicMessagePlayerAction:(id)sender; // send message to all
  31. - (IBAction)foldAction:(id)sender;
  32. - (IBAction)callAction:(id)sender;
  33. - (IBAction)raisePotAction:(id)sender;
  34. - (IBAction)raiseHalfPotAction:(id)sender;
  35. - (IBAction)raiseMaximumAction:(id)sender;
  36. - (IBAction)raiseMinimumAction:(id)sender;
  37. - (IBAction)raiseSpecifiedAmountAction:(id)sender;
  38.  
  39. // hooks for cliff
  40. - (void)newPokerTable;   // to start over fresh (or should we make new window??)
  41.  
  42. // call before each new game
  43. - (void)newHand;  
  44.  
  45. // call this in order of players
  46. // we can add an index if you prefer!
  47. - (void)addPlayer:(const char *)player cash:(int)amount;
  48. - (void)player:(const char *)player hasCash:(int)amount;
  49.  
  50. // when done adding players, call this:
  51. - (void)beginAddingPlayers;
  52. - (void)readyToBeginGame;
  53.  
  54. // when a public card is turned...
  55. - (void)publicCardNumber:(int)indexOfCard didShowCard:(Card *)card;
  56.  
  57. // show down:
  58. - (IBAction)seeHoleCardsOfPlayer:(const char *)player;
  59.  
  60. - (Player *)findPlayerWithName:(const char *)playerName;
  61. - (void)deletePlayer:(const char *)player;
  62. - (void)setButtonPlayer:(const char *)playerName;
  63. - (void)setPlayersTurn:(const char *)playerName;
  64. - (void)userGotFirstHoleCard:(Card *)card secondCard:(Card *)card;
  65.  
  66. - (BOOL)isButtonPlayer:(Player *)player;
  67. - (void)setStatusString:(NSString *)message;
  68.  
  69. /* start of crap added by Cliff */
  70.  
  71. - (HoldEmHighHand *) hand;
  72. - (void)player:(const char *)player messages:(const char *)message;
  73.  
  74. - (void)playerQuits:(const char *) player n_left:(int)nleft;
  75. - (void)tourneyStarted;
  76. - (void)blindsAre:(int) small_blind and:(int) big_blind;
  77. - (void)player:(const char *)player toCall:(int)to_call;
  78. - (void)player:(const char *)player blinds:(int)blind potNow:(int)pot allIn:(BOOL)allIn;
  79. - (void) blindsWillDoubleIn:(int)blind_remaining units:(const char *)blind_remaining_units;
  80. - (void) beginHand:(int)hand_no n_players:(int)n_players;
  81. - (void) player:(const char *)player foldsLeaving:(int)n_players;
  82. - (void) player:(const char *)player calls:(int)amount potNow:(int)pot allIn:(BOOL)allIn;
  83. - (void) player:(const char *)player vacationedBy:(const char *)by_whom;
  84. - (void) playerChecks:(const char *)player;
  85. - (void) player:(const char *)player bets:(int)amount potNow:(int)pot allIn:(BOOL)allIn;
  86. - (void) playerBackFromVacation:(const char *)player;
  87. - (void) player:(const char *)player wins:(int) amount withHand:(const char *)hand;
  88. - (void) aboutToShowHands;
  89. - (void) player:(const char *)player raises:(int)amount potNow:(int)pot allIn:(BOOL)allIn;
  90. - (void) playerBusted:(const char *)player;
  91. - (void) playerQuit:(const char *)player;
  92. /* end of Cliff crap */
  93.  
  94.  
  95. @end
  96.  
  97. #define NUM_PLAYERS_COLS    7
  98. #define NUM_PLAYERS_ROWS    7
  99. #define NUM_POSSIBLE_PLAYER_CELLS 24
  100. #define USER_ROW    6
  101. #define USER_COL    3
  102.  
  103.